/* Ext.define('Animal', {
	config: {
		name: null
	},
	constructor: function(config){
		this.initConfig(config);
	},
	speak: function(){
		console.log("Grunt");
	}
	
});

Ext.define('Human', {
	extend: 'Animal',
	speak: function(){
		console.log("I am "+this.getName());
	},
	applyName: function(newName, oldName){
		return confirm("Do you want to change name to "+newName+"?")? newName: oldName; 
	},
	updateName: function(newName, oldName){
		console.log("Name change to "+newName+"");
	}
}); */

Ext.Loader.setConfig({
	enable: true,
	paths: {
		'DeftQuickStart': 'app'
	}
});

Ext.syncRequire(['DeftQuickStart.Application']);
Ext.create('DeftQuickStart.Application');


/* Ext.application({
    models: ["User"],
	
    name: 'HelloWorld',

    requires: [
        'Ext.MessageBox',
		'Ext.Carousel'
    ],
	profiles: ['Phone', 'Tablet'],
    views: ['Main','View'],

    icon: {
        '57': 'resources/icons/Icon.png',
        '72': 'resources/icons/Icon~ipad.png',
        '114': 'resources/icons/Icon@2x.png',
        '144': 'resources/icons/Icon~ipad@2x.png'
    },

    isIconPrecomposed: true,

    startupImage: {
        '320x460': 'resources/startup/320x460.jpg',
        '640x920': 'resources/startup/640x920.png',
        '768x1004': 'resources/startup/768x1004.png',
        '748x1024': 'resources/startup/748x1024.png',
        '1536x2008': 'resources/startup/1536x2008.png',
        '1496x2048': 'resources/startup/1496x2048.png'
    },

    launch: function() { */
        // Destroy the #appLoadingIndicator element
        //Ext.fly('appLoadingIndicator').destroy();

        // Initialize the main view
		
		//Ext.create('HelloWorld.view.View');
		
		/* var bob = Ext.create('Animal', {
			name: "Bob"
		});
		
		
		bob.speak();
		
		var zolo = Ext.create('Human', {
		});
		
		zolo.speak();
		zolo.setName("Trung");
		Ext.Msg.alert(zolo.getName(), "OMG");
		
		var red = {
			xtype: 'carousel',
			items:[
				{style:"background-color: red; color: white;"},
				{style:"background-color: green; color: white;"},
				{style:"background-color: blue; color: white;"}
			],
			
		};
		
		
		
		var blue = {
			style:"background-color: blue; color:white;",
			title:"Blue",
			html:"Blue <a href='#login/1'>Login</a>"
		};
		
		var green = {
			style : "background-color: green; color:white;",
			title : "Green",
			html : "Green"
		}; */
		/* HelloWorld.container = Ext.create('Ext.Carousel', {
			fullscreen: true,
			direction:'vertical',
			layout:{
				animation:{type: 'fade', duration:500}
			},
			items:[red, green, blue]
		}); */
		
		
		
		//Ext.Viewport.add(red);
		/* 
		var button = Ext.Viewport.add({
			xtype: 'button',
			text: 'new',
			ui: 'action',
			id: 'mybutton'
			listeners: {
				tap: function(){
					Ext.Msg.alert("OMG YOU TAP ME");
					this.setText("bad name");
				}
			}
		}); */
		
		/* button.on('tap', function(){
			Ext.Msg.alert("OMG HOW YOU DARE TAP ME", "AC AC");
		}); */
		/* 
		HelloWorld.container = Ext.create('Ext.Container', {
			fullscreen: true,
			layout:{	
				type:'vbox',
				pack:'center'
			},
			defaults: {flex:1},
			items:[red, blue, button]
		}); */
 /*    },

    onUpdated: function() {
        Ext.Msg.confirm(
            "Application Update",
            "This application has just successfully been updated to the latest version. Reload now?",
            function(buttonId) {
                if (buttonId === 'yes') {
                    window.location.reload();
                }
            }
        );
    }
});
 */